<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8" />
        <title>MarkDown编辑器</title>
        <link rel="stylesheet" href="editormd/css/editormd.min.css" />
		<link rel="stylesheet" href="css/bootstrap.css"/>
		<link rel="stylesheet" href="css/index.css" />
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    </head>
	<body>
		<div id="vue">
			<input class="title" v-model="curMarkDown['title']"></input>
			<h1 class="editor-title">
				<a href="https://pandao.github.io/editor.md/" target="_blank" class="x-a-high">
					<img src="./favicon.ico" alt="MarkDown">MarkDown
				</a>编辑器
				<span class="x-tips" v-html="markDownTips" ref="tipsBar"></span>
				
				<span class="x-toolbox">
					<a href="javascript:;" @click.stop.prevent="newMarkDown" class="x-tool">新建</a>
					<span class="x-line">|</span>
					<a href="javascript:;" @click.stop.prevent="saveMarkDown" class="x-tool">保存</a>
					<span class="x-line">|</span>
					<input type="file" style="display: none;" id="file" />
					<a href="javascript:;" @click.stop.prevent="importMarkDown" class="x-tool">打开</a>
					<span class="x-line">|</span>
					<a href="javascript:;" @click.stop.prevent="exportMarkDown" class="x-tool">导出</a>
					<span class="x-line">|</span>
					<a href="javascript:;" @click.stop.prevent="myMarkDownList" class="x-tool">我的MarkDown</a>
				</span>
			</h1>
			
			<div class="my-Markdown-list scroll" v-show="showSavedMarkdownList" v-on:mouseover="showSavedMarkdownList=true" v-on:mouseout="showSavedMarkdownList=false" style="display: none;">
				<span class="x-toolbox">
					<a href="javascript:;" @click="exportMarkDown('all')" class="x-tool">全部导出</a>
					<span class="x-line">|</span>
					<a href="javascript:;" @click="myMarkDownList" class="x-tool">关闭</a>
				</span>
				<table class="table table-bordered table-hover table-condensed">
					<thead>
						<tr>
							<th>序号</th>
							<th>标题(点击可编辑)</th>
							<th>创建日期</th>
							<th>更新日期</th>
							<th class="th-op">操作</th>
						</tr>
					</thead>
					<tbody>
						<tr v-for="key,index in mySavedMarkDownListKey" :key="key">
							<td>{{index+1}}</td>
							<td> <a href="javascript:;" @click.stop.prevent="editMakrdown(key)">{{getMarkDown(key)['title']}}</a></td>
							<td>{{getMarkDown(key)['createTime']}}</td>
							<td>{{getMarkDown(key)['finalTime']}}</td>
							<td><button class="btn btn-xs btn-success" @click="editMakrdown(key)">编辑</button>
								<button class="btn btn-xs btn-warning" @click="deleteMakrdown(key)">删除</button></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div id="layout" style="height:100%">
			<div id="editormd">
				<textarea style="display:none;"></textarea>
			</div>
		</div>
		<script src="js/jquery.min.js"></script>
		<script src="editormd/editormd.min.js"></script>
		<script src="js/initMarkDown.js"></script>
		<script src="js/vue.js"></script>
		<script src="js/index.js"></script>
		<!-- 下载相关 -->
		<script src="js/zip/jszip.js"></script>
		<script src="js/zip/jszip-utils.js"></script>
		<!--[if IE]>
		<script src="js/zip/jszip-utils-ie.js"></script>
		<![endif]-->
		<script src="js/zip/FileSaver.js"></script>
		<!-- 下载相关 END -->
	</body>
</html>